CONFIGURE MAXSETSIZE TO UNLIMITED; # default 设置每个通道能够创建备份集的最大值为1G; CONFIGURE MAXSETSIZE TO 1 G; 使用backupset备份时,如果存在某个表空间文件大于1G,则会提示报错
1 2
RMAN-03002: failure of backup command at 04/13/2019 23:32:46 RMAN-06183: datafile or datafile copy /data/u01/app/oracle/oradata/boston/sysaux01.dbf (file number 2) larger than MAXSETSIZE
如果系统参数配置了多个通道,可以直接添加maxpiecesize: CONFIGURE CHANNEL 1 DEVICE TYPE DISK MAXPIECESIZE 100 M; CONFIGURE CHANNEL 2 DEVICE TYPE DISK MAXPIECESIZE 50 M; CONFIGURE CHANNEL 3 DEVICE TYPE DISK MAXPIECESIZE 50 M;
RMAN> backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U'; Starting backup at 2019:04:14 00:17:11 using channel ORA_DISK_1 using channel ORA_DISK_2 using channel ORA_DISK_3 ...... channel ORA_DISK_3: finished piece 1 at 2019:04:14 00:17:15 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kituu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_3: backup set complete, elapsed time: 00:00:03 channel ORA_DISK_2: finished piece 1 at 2019:04:14 00:17:19 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 2 at 2019:04:14 00:17:19 channel ORA_DISK_2: finished piece 2 at 2019:04:14 00:17:26 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_2_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 3 at 2019:04:14 00:17:26 channel ORA_DISK_1: finished piece 1 at 2019:04:14 00:17:29 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_1_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: starting piece 2 at 2019:04:14 00:17:29 channel ORA_DISK_2: finished piece 3 at 2019:04:14 00:17:36 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_3_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 4 at 2019:04:14 00:17:36 channel ORA_DISK_2: finished piece 4 at 2019:04:14 00:17:43 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_4_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: starting piece 5 at 2019:04:14 00:17:43 channel ORA_DISK_1: finished piece 2 at 2019:04:14 00:17:44 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_2_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: starting piece 3 at 2019:04:14 00:17:44 channel ORA_DISK_2: finished piece 5 at 2019:04:14 00:17:45 piece handle=/tmp/backuporacle/db_BOSTON_20190414_khtuu587_5_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_2: backup set complete, elapsed time: 00:00:34 channel ORA_DISK_1: finished piece 3 at 2019:04:14 00:17:59 piece handle=/tmp/backuporacle/db_BOSTON_20190414_kgtuu587_3_1 tag=TAG20190414T001711 comment=NONE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:48 Finished backup at 2019:04:14 00:17:59
run { allocate channel t1 type disk maxpiecesize = 50M; allocate channel t2 type disk maxpiecesize = 80M; allocate channel t3 type disk; backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U'; }
3、完全备份数据时,单独排除某一个数据库不备份
CONFIGURE EXCLUDE FOR TABLESPACE users; 开始备份,tablespace users被自动过滤掉,没有备份:
RMAN> show snapshot controlfile name; RMAN configuration parameters for database with db_unique_name BOSTON are: CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/oracle/snapcf_boston.f';
修改snapshot controlfile路径CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/root/snap_boston.ctl’; 设置的路径oralce用户必须有访问权限,如果没有访问权限,会报下面错误:
1 2 3 4 5 6
ORA-01580: error creating control backup file /root/snap_boston.ctl ORA-27037: unable to obtain file status Linux-x86_64 Error: 13: Permission denied Additional information: 6
RMAN-08132: WARNING: cannot update recovery area reclaimable file list